//
//  FDBMBase.h
//  FMDBSelf
//
//  Created by Cheng on 15/12/26.
//  Copyright © 2015年 Cheng. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CGFdbmBase : NSObject

+ (BOOL) isTableOK:(NSString *)tableName;

+(void)CreatTableWhithPath:(NSString *)PathName TableName:(NSString *)tableName DicName:(NSString *)Dic IdstrName:(NSString *)idStrName;

+(void)IntoDicTableName:(NSString *)tableName DicName:(NSString *)DicName IdstrName:(NSString *)idStrName Dic:(NSDictionary *)dic idStr:(NSString *)idStr;

+(NSString *)SeachWhithTableName:(NSString *)tableName IdStrName:(NSString *)idStrName;

+(BOOL)DeleteDtaWhiTable:(NSString *)table IdStrName:(NSString *)idStrName idStr:(NSString *)idStr;

+(BOOL)UPDataWhiTable:(NSString *)table IdStrName:(NSString *)idStrName idStr:(NSString *)idStr SetIdStr:(NSString *)SetidStr;


+(NSArray *)ListWhith:(NSString *)table dicName:(NSString *)dicName;


+ (NSInteger) getTableItemCount:(NSString *)tableName;

+ (BOOL) eraseTable:(NSString *)tableName;
+(void)OpenSQlWhiPathName:(NSString *)PathName;


/**
 *  获取本地数据库 数据
 *
 *  @param SQLpath 数据库的名字 不需要后面的 .db
 *  @param tabName 表名
 *  @param string  查询条件
 *
 *  @return 查询结果的字典加到可变数组
 */
+(NSMutableArray *)SearchSelfPathSqlWhithPath:(NSString *)SQLpath AndTabName:(NSString *)tabName SelectSting:(NSString *)string;

+(NSArray *)SeachWhithPath:(NSString *)SQLpath AndTableName:(NSString *)tableName IdStrName:(NSString *)idStrName;

@end
